package edu.scau.mis.web.controller;

import edu.scau.mis.cloth.entity.GsAttrs;
import edu.scau.mis.cloth.service.GsAttrsService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;

/**
 * (GsAttrs)表控制层
 *
 * @author CJW
 * @since 2022-04-02 20:28:04
 */
@RestController
@RequestMapping("gsAttrs")
public class GsAttrsController {
    /**
     * 服务对象
     */
    @Autowired
    private GsAttrsService gsAttrsService;
//    根据商品类别查看库存信息
    @GetMapping("/checkByCate")
    public List<Map<String,Object>> checkByCate(){
        return gsAttrsService.checkInventoryByCategory();
    }

    @GetMapping("checkById/{clId}")
    public List<Map<String,Object>> checkInventoryById(@PathVariable("clId") Integer clId) {
        return gsAttrsService.checkInventoryById(clId);
    }

    @GetMapping("/checkBySize")
    public List<Map<String,Object>> checkInventoryBySize(){
        return gsAttrsService.checkInventoryBySize();
    }


}

